package com.yunke.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 分销商信息VO
 *
 * @author yunke
 * @since 1.0.0
 */
@Data
@Schema(description = "分销商信息VO")
public class YunkeDistributorVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "分销商ID")
    private Long id;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "上级分销商ID")
    private Long parentId;

    @Schema(description = "上级分销商昵称")
    private String parentNickname;

    @Schema(description = "分销商等级（1一级 2二级 3三级）")
    private Integer level;

    @Schema(description = "邀请码")
    private String inviteCode;

    @Schema(description = "分销商昵称")
    private String nickname;

    @Schema(description = "分销商头像")
    private String avatar;

    @Schema(description = "联系手机号")
    private String mobile;

    @Schema(description = "联系微信号")
    private String wechat;

    @Schema(description = "收款账户类型名称")
    private String accountTypeName;

    @Schema(description = "收款账户")
    private String accountInfo;

    @Schema(description = "收款户名")
    private String accountName;

    @Schema(description = "总佣金金额")
    private BigDecimal totalCommission;

    @Schema(description = "已提现金额")
    private BigDecimal withdrawnAmount;

    @Schema(description = "可提现金额")
    private BigDecimal availableAmount;

    @Schema(description = "累计推广用户数")
    private Integer totalInviteUsers;

    @Schema(description = "累计推广订单数")
    private Integer totalInviteOrders;

    @Schema(description = "当月佣金")
    private BigDecimal monthCommission;

    @Schema(description = "当月推广数")
    private Integer monthInviteCount;

    @Schema(description = "审核状态名称")
    private String auditStatusName;

    @Schema(description = "审核意见")
    private String auditRemark;

    @Schema(description = "审核时间")
    private Long auditTime;

    @Schema(description = "分销商状态名称")
    private String distributorStatusName;

    @Schema(description = "申请时间")
    private Long applyTime;

    @Schema(description = "激活时间")
    private Long activeTime;

    @Schema(description = "最后活跃时间")
    private Long lastActiveTime;

    @Schema(description = "推广链接")
    private String promoteUrl;

    @Schema(description = "推广二维码")
    private String promoteQrcode;

    @Schema(description = "团队统计信息")
    private YunkeDistributorTeamStatsVo teamStats;

    @Schema(description = "佣金统计信息")
    private YunkeDistributorCommissionStatsVo commissionStats;

    /**
     * 团队统计信息
     */
    @Data
    @Schema(description = "团队统计信息")
    public static class YunkeDistributorTeamStatsVo implements Serializable {
        @Schema(description = "直推人数")
        private Integer directCount;

        @Schema(description = "团队总人数")
        private Integer totalTeamCount;

        @Schema(description = "一级团队人数")
        private Integer level1Count;

        @Schema(description = "二级团队人数")
        private Integer level2Count;

        @Schema(description = "三级团队人数")
        private Integer level3Count;
    }

    /**
     * 佣金统计信息
     */
    @Data
    @Schema(description = "佣金统计信息")
    public static class YunkeDistributorCommissionStatsVo implements Serializable {
        @Schema(description = "今日佣金")
        private BigDecimal todayCommission;

        @Schema(description = "昨日佣金")
        private BigDecimal yesterdayCommission;

        @Schema(description = "本周佣金")
        private BigDecimal weekCommission;

        @Schema(description = "本月佣金")
        private BigDecimal monthCommission;

        @Schema(description = "累计佣金")
        private BigDecimal totalCommission;
    }
} 